package com.revelvy.controller;

import com.revelvy.pojo.UserData;
import com.revelvy.utils.Meta;
import com.revelvy.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Author: Revelvy
 */
@Controller
public class LoginController {

    @PostMapping("/login")
    @ResponseBody
    public User login() {
//        List<User> users = new ArrayList<User>();
        Meta meta=new Meta("登录成功",200);
        UserData data = new UserData(500,0,"admin","123","123@qq.com",
                "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1MTI1NDQyOTksImV4cCI6MTUxMjYzMDY5OX0.eGrsrvwHm-tPsO9r_pxHIQ5i5L1kX9RX444uwnRGaIM");
        User user = new User(data, meta);
        return user;
    }
}


